import 'package:flutter/material.dart';

class MyApp9 extends StatelessWidget {
  const MyApp9({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      //导航条
      appBar: AppBar(
        title: const Text(
          'Flutter初体验',
          style: TextStyle(color: Colors.white, fontSize: 20),
        ),
        backgroundColor: Colors.pink,
        centerTitle: true,
      ),
      //主体区域
      body:
      //
      Container(
        margin: EdgeInsets.only(top: 50),
        width: MediaQuery.of(context).size.width,
        height: 120,
        color: Colors.cyan,
        child: Row(
          //主轴的对齐方式
          mainAxisAlignment: MainAxisAlignment.spaceAround,
          crossAxisAlignment: CrossAxisAlignment.center,
          //侧轴的对齐方式
          children: [
            Image.network(
              'https://yanxuan-item.nosdn.127.net/afd6199278a5b8fd783bc4947960fabc.jpg',
              width: 86,
            ),
            // Text(
            //   '茶水分离杯耐热隔热玻璃杯茶水分离杯耐热隔热玻璃杯 茶水分离杯耐热隔热玻璃杯茶水分离杯耐热隔热玻璃杯',
            //   style: TextStyle(fontSize: 20),
            // ),
            Expanded(
              child: Text(
                '茶水分离杯耐热隔热玻璃杯，茶水分离杯耐热隔热玻璃杯，茶水分离杯耐热隔热玻璃杯，444444444444433 ，444444444444433，444444444444433，444444444444433，444444444444433',
                style: TextStyle(fontSize: 20),
                maxLines: 3,
                overflow: TextOverflow.ellipsis,
              ),
            ),
            Icon(Icons.add),
          ],
        ),
      ),
    );
  }
}
